
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<html>
<head>
<title>商家列表信息页面</title>
<c:import url="hcommon.jsp"></c:import>
<c:import url="header.jsp"></c:import>
	<c:import url="left.jsp"></c:import>
<script>
	function choose(obj) {
		console.log(obj)
		if (obj.checked == true) {
			$("[name='ids']").prop("checked", true);
		} else {
			$("[name='ids']").prop("checked", false);
		}
	}
</script>
</head>
<body>
<div style="margin-top:68px ;margin-left: 240px">
		<form action="deleteMerchant.action" method="post">
			<table class="table table-hover">
				<tr>
					<th><input type="checkbox" value="全选/全部选" onclick="choose(this)"/></th>
					<th>商家编号</th>
					<th>商家姓名</th>
					<th>商家性别</th>
					<th>商家年龄</th>
					<th>出生日期</th>
					<th>身份证号</th>
					<th>商家密码</th>
					<th>商家电话</th>
					<th>门店编号</th>
					<th>门店名称</th>
					<th>option</th>
				</tr>
				<c:forEach var="inv" items="${list}">
					<tr>
					<td><input name="ids" type="checkbox" value="${inv.mid}" /></td>
						<td>${inv.mid}</td>
						<td><a href="findbyid?mid=${inv.mid}">${inv.mname}</a></td>
						<td>${inv.msex}</td>
						<td>${inv.mage}</td>
						<td><fmt:formatDate value="${inv.mbirthday}"
								pattern="yyyy-MM-dd" /></td>
						<td>${inv.midcard}</td>
						<td>${inv.mpass}</td>
						<td>${inv.mtel}</td>
						<td>${inv.sid}</td>
						<td>${inv.store.sname}</td>
						<td><input onclick="javascript:location.href='toupdateMerchant.action?mid=${inv.mid}'"
							value="修改" type="button" /></td>
					</tr>
				</c:forEach>
				<tr align="center">
					<td colspan="10"><input
							onclick="javascript:location.href='toaddMerchant.action'" value="添加"
						type="button" /> <input value="删除" type="submit" /></td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>
